// 获取首页数据的接口
import utils from "../utils/sys";

// 获取banner数据

export const getBannerPics = () =>
  utils.http({
    url: "/app/init",
  });

//获取医院地区信息
export const getHospitalInfo = (areaId) =>
  utils.http({
    url: "/Index/index",
    data: {
      aid: areaId,
    },
  });

// 获取医院详细信息
export const getHospitalDetail = (hid) =>
  utils.http({
    url: "/Hospital/index",
    data: {
      hid,
    },
  });

// 获取服务列表
export const getServiceLists = (data) =>
  utils.http({
    url: "/Service/order",
    data,
  });

// 获取服务对象信息
export const getServiceUserLists = (data) =>
  utils.http({
    url: "/User/clients",
    data,
  });

// 创建订单接口
export const createOrder = (data) =>
  utils.http({
    url: "/pay/createOrder",
    data,
    method: "POST",
    header: {
      token: uni.getStorageSync("token"),
    },
  });

// 获取验证码接口
export const getAuthCode = (data) =>
  utils.http({
    url: "/get/code",
    data,
    method: "POST",
  });

// 验证码验证接口
export const verifyAuthCode = (data) =>
  utils.http({
    url: "/user/authentication",
    data,
    method: "POST",
  });

// 查看订单列表

export const getOrderLists = () =>
  utils.http({
    url: "/order/list",
    header: {
      token: uni.getStorageSync("token"),
    },
  });

// 获取订单详情
export const getOrderDetails = (data) =>
  utils.http({
    url: "/order/detail",
    data,
    header: {
      token: uni.getStorageSync("token"),
    },
  });

// 获取医院详情
export const getHospitalDetailInfoById = (data) =>
  utils.http({
    url: "/Hospital/index",
    data,
  });

// 获取用户信息
export const getUserInfo = () =>
  utils.http({
    url: "/User/index",
    header: {
      token: uni.getStorageSync("token"),
    },
  });
